{% extends "base.volt" %}

{% block pageFooter%}
{{ javascript_include("/js/area.js", false) }}
{{ javascript_include("/assets/manage/js/bp/apply.js", false) }}
{% endblock %}

{% block content %}
{{ partial("module/left_bp") }}
<div class="col-xs-10">
    <ol class="breadcrumb">
        <li><a href="{{ url.get('bp/list') }}">美容院</a></li>
        <li><a href="{{ url.get('bp/apply') }}">申请美容院列表</a></li>
        <li class="active">列表</li>
    </ol>
    <div class="panel panel-default">
        <div class="panel-body">
            <form class="form-inline" action="{{url.get("Bp/apply")}}" method="get">
                <div class="form-group">
                    <div class="input-group">
                        <label class="input-group-addon">代理商</label>
                        <select class="form-control" name="agent_id" >
                            <option value="">全部</option>
                            <?php foreach($agents_list as $k) {?>
                            
                            	<option value="<?=$k['agent_id']?>" <?php if($agent_id == $k['agent_id']){?> selected="selected"  <?php }?>><?=$k['agent_name']?></option>
                            
                            <?php }?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary"><i class="fa fa-filter"></i> 搜 索</button>
                </div>
            </form>
        </div>
    </div>

    <table class="table table-hover">
        <thead>
        <tr>
            <th style="width: 60px;">代理商</th>
            <th style="width: 100px;">分店名称</th>
            <th style="width:100px;">状态</th>
            <th style="width: 180px;">操作</th>
        </tr>
        </thead>
        <?php foreach($list as $r){?>
        <tr>
        	<td>
        	<?=$r['agent_name']?>
        	</td>
        	<td>
        		<?=$r['branch_name']?>
        	</td>
        	<td>待审核</td>
        	<td><a class="btn btn-primary confirm" durl="/manage/bp/add?branch_id=<?=$r['shop_id']?>" dbranchid="<?=$r['shop_id']?>" href="javascript:void(0);" >通过</a></td>
        </tr>
        <?php }?>
    </table>

    {{ this.tagNav.page(
        page,
        total,
        limit,
        url.get('bp/apply', [
            'filterName': filterName,
            'filterProvince': filterProvince,
            'filterCity': filterCity,
            'filterDistrict': filterDistrict,
            'filterState': filterState,
            'filterSell': filterSell,
            'filterMedal': filterMedal,
            'page': '__PAGE__'
        ]
    )) }}

</div>

{% endblock %}